package com.study.design.pattern.pattern.behavioral.Iterator;

/**
 * @Author: gongsl
 * @Date: 2025-03-23 11:19
 * @description: 书籍类
 */
public class Book {
    /**
     * 书名
     */
    private String title;
    /**
     * 作者
     */
    private String author;

    public Book(String title, String author) {
        this.title = title;
        this.author = author;
    }

    public String getTitle() {
        return title;
    }

    public String getAuthor() {
        return author;
    }

    @Override
    public String toString() {
        return title + " - " + author;
    }
}
